package main
import "fmt"

func main(){
	//像切片中插入元素
	var sliceA[]string
	fmt.Printf("type=%T,len=%d,cap=%d\n",sliceA,len(sliceA),cap(sliceA))
	sliceA=append(sliceA,"重庆","上海","北京")
	fmt.Println(sliceA)
	fmt.Printf("type=%T,len=%d,cap=%d\n",sliceA,len(sliceA),cap(sliceA))

	//合并两个切片
	sliceB:=[]string{"成都","纽约"}
	sliceA=append(sliceA,sliceB...)
	fmt.Printf("sliceA=%v,len=%d,cap=%d\n",sliceA,len(sliceA),cap(sliceA))

}